\hypertarget{uart_8h}{
\section{atmega1281/low/include/uart.h File Reference}
\label{uart_8h}\index{atmega1281/low/include/uart.h@{atmega1281/low/include/uart.h}}
}
{\ttfamily \#include $<$avr/io.h$>$}\par
\subsection*{Data Structures}
\begin{DoxyCompactItemize}
\item 
struct \hyperlink{structint2byte}{int2byte}
\end{DoxyCompactItemize}
\subsection*{Defines}
\begin{DoxyCompactItemize}
\item 
\#define \hyperlink{group__nxbot__uart_ga367ff7b5de225ed936a63239ad4adb0b}{UART\_\-BAUD\_\-SELECT}(baudRate, xtalCpu)~((xtalCpu)/((baudRate)$\ast$16l)-\/0.5)
\begin{DoxyCompactList}\small\item\em UART Baudrate Expression. \item\end{DoxyCompactList}\item 
\#define \hyperlink{group__nxbot__uart_ga1a02d45130520cb651ab313e69039382}{UART\_\-BAUD\_\-SELECT\_\-DOUBLE\_\-SPEED}(baudRate, xtalCpu)~(((xtalCpu)/((baudRate)$\ast$8l)-\/1)$|$0x8000)
\begin{DoxyCompactList}\small\item\em UART Baudrate Expression for ATmega double speed mode. \item\end{DoxyCompactList}\item 
\#define \hyperlink{group__nxbot__uart_ga5bdd6772c246436bb14377095de79b31}{UART\_\-RX\_\-BUFFER\_\-SIZE}~64
\begin{DoxyCompactList}\small\item\em Size of the circular receive buffer, must be power of 2. \item\end{DoxyCompactList}\item 
\#define \hyperlink{group__nxbot__uart_ga05f5d709605c6317c97e4974bec3402a}{UART\_\-TX\_\-BUFFER\_\-SIZE}~64
\begin{DoxyCompactList}\small\item\em Size of the circular transmit buffer, must be power of 2. \item\end{DoxyCompactList}\item 
\#define \hyperlink{group__nxbot__uart_gabcdb1041d763560cd8f8e722370dfd37}{UART\_\-FRAME\_\-ERROR}~0x0800
\begin{DoxyCompactList}\small\item\em high byte error return code of \hyperlink{group__nxbot__uart_gaefaab30a8338ec46a6be35b99b1b4f09}{uart\_\-getc()} \item\end{DoxyCompactList}\item 
\#define \hyperlink{group__nxbot__uart_ga3183177e3613d8785d8cc8516931beb6}{UART\_\-OVERRUN\_\-ERROR}~0x0400
\begin{DoxyCompactList}\small\item\em high byte error return code of \hyperlink{group__nxbot__uart_gaefaab30a8338ec46a6be35b99b1b4f09}{uart\_\-getc()} \item\end{DoxyCompactList}\item 
\#define \hyperlink{group__nxbot__uart_ga94758f3dad6864703b7417d3e40f11df}{UART\_\-BUFFER\_\-OVERFLOW}~0x0200
\begin{DoxyCompactList}\small\item\em high byte error return code of \hyperlink{group__nxbot__uart_gaefaab30a8338ec46a6be35b99b1b4f09}{uart\_\-getc()} \item\end{DoxyCompactList}\item 
\#define \hyperlink{group__nxbot__uart_ga77ba544d423ff42d400220a05303f268}{UART\_\-NO\_\-DATA}~0x0100
\begin{DoxyCompactList}\small\item\em high byte error return code of \hyperlink{group__nxbot__uart_gaefaab30a8338ec46a6be35b99b1b4f09}{uart\_\-getc()} \item\end{DoxyCompactList}\item 
\#define \hyperlink{group__nxbot__uart_ga57bacc1e506f422e7a211eea0612fa0b}{UART\_\-FORMAT\_\-8D0P1S}~0
\begin{DoxyCompactList}\small\item\em Constant definition for the data format. \item\end{DoxyCompactList}\item 
\#define \hyperlink{group__nxbot__uart_gaca07239f804a550b871e719ce9e3dca0}{UART\_\-FORMAT\_\-8DEP1S}~1
\begin{DoxyCompactList}\small\item\em Constant definition for the data format. \item\end{DoxyCompactList}\item 
\#define \hyperlink{group__nxbot__uart_gaea96ce420f365ef080f17bfdf6deaede}{UART\_\-FORMAT\_\-8DOP1S}~2
\begin{DoxyCompactList}\small\item\em Constant definition for the data format. \item\end{DoxyCompactList}\item 
\#define \hyperlink{group__nxbot__uart_ga50dfb815b6650c82573c6b88ea4e8e1b}{UART\_\-FORMAT\_\-8D0P2S}~3
\begin{DoxyCompactList}\small\item\em Constant definition for the data format. \item\end{DoxyCompactList}\item 
\#define \hyperlink{group__nxbot__uart_gaf5061893c0cfa22da9bad958270d2372}{UART\_\-FORMAT\_\-8DEP2S}~4
\begin{DoxyCompactList}\small\item\em Constant definition for the data format. \item\end{DoxyCompactList}\item 
\#define \hyperlink{group__nxbot__uart_ga500a5b15d52540cd77e478bcec657f45}{UART\_\-FORMAT\_\-8DOP2S}~5
\begin{DoxyCompactList}\small\item\em Constant definition for the data format. \item\end{DoxyCompactList}\item 
\#define \hyperlink{group__nxbot__uart_gae9e143569df2285379bc55f9f5595bf9}{uart\_\-puts\_\-P}(\_\-\_\-s)~uart\_\-puts\_\-p(PSTR(\_\-\_\-s))
\begin{DoxyCompactList}\small\item\em Macro to automatically put a string constant into program memory. \item\end{DoxyCompactList}\item 
\#define \hyperlink{group__nxbot__uart_gaabd7a5b0c15611ee9ecb2873cc9ee87a}{uart1\_\-puts\_\-P}(\_\-\_\-s)~uart1\_\-puts\_\-p(PSTR(\_\-\_\-s))
\begin{DoxyCompactList}\small\item\em Macro to automatically put a string constant into program memory. \item\end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
void \hyperlink{group__nxbot__uart_ga5701b005bc0cffffb39cdd906116ebe4}{uart\_\-init} (unsigned int baudrate, unsigned char format)
\begin{DoxyCompactList}\small\item\em Initialize UART and set baudrate. \item\end{DoxyCompactList}\item 
unsigned int \hyperlink{group__nxbot__uart_gaefaab30a8338ec46a6be35b99b1b4f09}{uart\_\-getc} (void)
\begin{DoxyCompactList}\small\item\em Get received byte from ringbuffer. \item\end{DoxyCompactList}\item 
void \hyperlink{group__nxbot__uart_gad975221bc08b901e4c7ad69f9c9a97e2}{uart\_\-putc} (unsigned char data)
\begin{DoxyCompactList}\small\item\em Put byte to ringbuffer for transmitting via UART. \item\end{DoxyCompactList}\item 
void \hyperlink{group__nxbot__uart_ga5bb9ccbe5b0438412915dd339f1eb68c}{uart\_\-puti} (int data)
\begin{DoxyCompactList}\small\item\em Put integer to ringbuffer for transmitting via UART. \item\end{DoxyCompactList}\item 
void \hyperlink{group__nxbot__uart_gae52facc0a56086a365bb0018160d8d71}{uart\_\-puts} (const char $\ast$s)
\begin{DoxyCompactList}\small\item\em Put string to ringbuffer for transmitting via UART. \item\end{DoxyCompactList}\item 
void \hyperlink{group__nxbot__uart_gaf3ba982ae2eee7a8db1f89240a16b4d1}{uart\_\-puts\_\-len} (const unsigned char $\ast$s, unsigned int len)
\begin{DoxyCompactList}\small\item\em Put string to ringbuffer for transmitting via UART, definining number of characters to be sended. \item\end{DoxyCompactList}\item 
void \hyperlink{group__nxbot__uart_ga6d78b6744db6232f52b4616402036c2f}{uart\_\-puts\_\-p} (const char $\ast$s)
\begin{DoxyCompactList}\small\item\em Put string from program memory to ringbuffer for transmitting via UART. \item\end{DoxyCompactList}\item 
char \hyperlink{group__nxbot__uart_ga7da3f9ebba28d4d1b59581a57d6023f4}{uart\_\-gets} (char $\ast$s)
\begin{DoxyCompactList}\small\item\em Get string from UART to memory. \item\end{DoxyCompactList}\item 
void \hyperlink{group__nxbot__uart_ga3380272cdfea0cf440cb299c2c84a8db}{uart1\_\-init} (unsigned int baudrate, unsigned char format)
\begin{DoxyCompactList}\small\item\em Initialize USART1 (only available on selected ATmegas) \item\end{DoxyCompactList}\item 
unsigned int \hyperlink{group__nxbot__uart_gaeb1405c641e5bc9b7224018f5e8d90de}{uart1\_\-getc} (void)
\begin{DoxyCompactList}\small\item\em Get received byte of USART1 from ringbuffer. (only available on selected ATmega) \item\end{DoxyCompactList}\item 
void \hyperlink{group__nxbot__uart_gab465f689d197fadfbacc374fc9411154}{uart1\_\-putc} (unsigned char data)
\begin{DoxyCompactList}\small\item\em Put byte to ringbuffer for transmitting via USART1 (only available on selected ATmega) \item\end{DoxyCompactList}\item 
void \hyperlink{group__nxbot__uart_gaecf82182ab0f9af94822a3755609e4fd}{uart1\_\-puti} (int data)
\begin{DoxyCompactList}\small\item\em Put integer to ringbuffer for transmitting via USART1 (only available on selected ATmega) \item\end{DoxyCompactList}\item 
void \hyperlink{group__nxbot__uart_ga5568f8f3913b218fd4d0346af78831b2}{uart1\_\-puts} (const char $\ast$s)
\begin{DoxyCompactList}\small\item\em Put string to ringbuffer for transmitting via USART1 (only available on selected ATmega) \item\end{DoxyCompactList}\item 
void \hyperlink{group__nxbot__uart_ga1e8074d0a2d5922601c5db2f9777ba79}{uart1\_\-puts\_\-p} (const char $\ast$s)
\begin{DoxyCompactList}\small\item\em Put string from program memory to ringbuffer for transmitting via USART1 (only available on selected ATmega) \item\end{DoxyCompactList}\end{DoxyCompactItemize}
